home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #3 / Commodore_Disk_User_Vol.1_3_1988_-.d64 / multifill demo (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  111 lines

  1. 10 ifpeek(828)<>24thenload"multifill",8,1
  2. 20 poke53281,14:poke53280,14
  3. 30 print"[147]            colour fill demo[154]"           "
  4. 40 k[178]14:w[178]40:h[178]24:lb[178]40:hb[178]4:[141]1040
  5. 50 k[178]160:w[178]40:h[178]24:lb[178]40:hb[178]4:a$[178]"c":[141]1040:a$[178]""
  6. 60 [129]a[178]0[164]16
  7. 70 k[178]a:w[178]16:h[178]1:hb[178][181](1517[173]256):lb[178]1517[171]hb[172]256
  8. 71 [129]b[178]0[164]10
  9. 72 w[178]w[170]2:h[178]h[170]2:lb[178]lb[171]41:[139]lb[179]0[167]hb[178]hb[171]1:lb[178]lb[170]255
  10. 73 [141]1040:[130]b,a
  11. 201 c[178]2000:[141]1030
  12. 210 [151]53281,0:[153]"load"
  13. 220 [153]"sysuse this utility to fill blocks of              colour - sys 828"
  14. 221 c[178]1000:[141]1030
  15. 230 k[178]160:w[178]10:h[178]5:lb[178]245:hb[178]4:a$[178]"c":[141]1040
  16. 240 [129]a[178]1[164]20
  17. 250 k[178]5[170]a:w[178]10:h[178]5:lb[178]245:hb[178]4:a$[178]"":[141]1040
  18. 260 [129]b[178]0[164]200:[130]b,a
  19. 270 [153]"or to fill blocks with characters"
  20. 280 [153]"              - sys 835
  21. 290 fora=20to0step-1
  22. 300 k=83+a:w=10:h=5:lb=20:hb=7:a$="c":gosub1040
  23. 310 forb=0to200:nextb,a
  24. 320 forb=0to400:next
  25. 330 print"[147]":poke53270,peek(53270)or16
  26. 340 print"[156]  it also works in multicolour but you"
  27. 350 print"   have to design your own characters
  28. 360 [151]53282,14:[151]53283,15
  29. 370 k[178]0:w[178]40:h[178]7:lb[178]144:hb[178]5:a$[178]"":[141]1040
  30. 380 [129]a[178]0[164]255:[151]1424[170]a,a:[130]
  31. 390 k[178]6:w[178]40:h[178]7:lb[178]144:hb[178]5:[141]1040
  32. 400 [129]a[178]0[164]23
  33. 410 c[178](5[170]a)[175]6[176]1
  34. 420 k[178]c:w[178]40:h[178]10:lb[178]0:hb[178]4:[141]1040
  35. 430 k[178]a[176]8:w[178]20:h[178]7:lb[178]154:hb[178]5:[141]1040
  36. 440 [129]b[178]0[164]300:[130]b,a
  37. 450 [129]b[178]0[164]500:[130]
  38. 460 [151]53270,[194](53270)[175]239
  39. 470 [129]b[178]0[164]300:[130]:[151]53281,6:[151]53280,6
  40. 480 [153]"loadsysyou can make shapes using smaller blocks"
  41. 490 k[178]160:w[178]40:h[178]21:lb[178]160:hb[178]4:a$[178]"c":[141]1040
  42. 500 k[178]7:w[178]40:h[178]21:lb[178]160:hb[178]4:a$[178]"":[141]1040
  43. 510 [129]b[178]0[164]2000:[130]
  44. 680 [135]k,w,h,lb,hb:[141]1040:[139]hb[179][177]6[167]680
  45. 681 [131]10,6,4,30,5
  46. 682 [131]2,3,2,71,5
  47. 683 [131]10,5,3,115,5
  48. 684 [131]7,1,1,156,5
  49. 685 [131]0,1,11,235,5
  50. 686 [131]8,20,11,236,5
  51. 687 [131]7,8,7,236,5
  52. 688 [131]7,5,7,251,5
  53. 689 [131]7,2,2,4,7
  54. 690 [131]7,2,1,6,7
  55. 691 [131]7,2,1,20,7
  56. 692 [131]7,2,2,22,7
  57. 693 [131]7,1,2,244,5
  58. 694 [131]7,1,1,245,5
  59. 695 [131]7,1,1,249,5
  60. 696 [131]7,1,2,250,5
  61. 697 [131]5,3,4,110,6
  62. 699 [129]b[178]0[164]5000:[130]
  63. 700 [153]"load":[151]53280,6:[151]53281,6
  64. 710 [153]"contfor your convenience the poke locations"
  65. 720 [153]"for both screen characters and screen"
  66. 730 [153]"colours use the same memory grid."
  67. 740 [153]"for example:"
  68. 750 [153]"if a character block is placed at the"
  69. 760 [153]"screen location 1717:";:c[178]3000:[141]1030
  70. 770 [129]a[178]1[164]40:k[178]32:w[178]10:h[178]5:hb[178][181](1717[173]256):lb[178]1717[171]256[172]hb:a$[178]"c":[141]1040
  71. 780 k[178]83:[141]1040:[130]
  72. 781 c[178]3000:[141]1030
  73. 790 [153]"cmd. the colour is alsopoked to 1717:":c[178]2000:[141]1030
  74. 800 a$[178]"":[129]a[178]1[164]20:c[178]100
  75. 801 k[178]7:[141]1040
  76. 802 [141]1030
  77. 803 k[178]8:[141]1040
  78. 804 [141]1030
  79. 805 [130]
  80. 810 [153]"press any key";
  81. 811 k[178]10:w[178]13:h[178]1:hb[178][181](1996[173]256):lb[178]1996[171]256[172]hb:[141]1040
  82. 812 [161]b$:[139]b$[179][177]""[167]830
  83. 813 k[178]0:[141]1040:[137]811
  84. 830 [153]"load":[151]53280,0:[151]53281,0
  85. 840 [153]"systo use the utility set up the parameterslike this:
  86. 850 c=3000:gosub1030
  87. 860 print"[150]poke 2   [154]with a colour or screen"
  88. 870 print"         character value"
  89. 880 gosub1030
  90. 890 print"[150]poke 250 [154]with the block width"
  91. 900 gosub1030
  92. 910 print"[150]poke 251 [154]with the block height"
  93. 920 gosub1030
  94. 930 print"[150]poke 252 [154]with the low byte of the top"
  95. 940 print"         left square of the block"
  96. 950 gosub1030
  97. 960 print"[150]poke 253 [154]with the high byte of the top"
  98. 970 print"         left square of the block"
  99. 980 gosub1030
  100. 990 print"[150]sys 828  [154]for c[153]o[154]l[155]o[158]ur[153]s"
  101. 1000 gosub1030
  102. 1010 print"[150]sys 835  [154]for characters[145]"
  103. 1011 print"press any key";
  104. 1012 k=7:w=13:h=1:hb=int(1996/256):lb=1996-256*hb:gosub1040
  105. 1013 getb$:ifb$<>""then1020
  106. 1014 k=0:gosub1040:goto1012
  107. 1020 k=32:a$="c":gosub1040:print"[145][145][145]":end
  108. 1030 forb=0toc:next:return
  109. 1040 poke2,k:poke250,w:poke251,h:poke252,lb:poke253,hb:ifa$="c"thensys835:return
  110. 1050 sys828:return
  111.